/** <a href="http://www.cpupk.com/decompiler">Eclipse Class Decompiler</a> plugin, Copyright (c) 2017 Chen Chao. **/
package com.minierp.controller;

import com.minierp.bean.OrderParameterCarrier;
import com.minierp.bean.QueryParameterBean;
import com.minierp.bean.QueryParameterCarrier;
import com.minierp.bean.QueryResult;
import com.minierp.bean.UserBean;
import com.minierp.dao.CodeRuleDao;
import com.minierp.dao.DepartmentDao;
import com.minierp.dao.IdGenerator;
import com.minierp.dao.OvBillDao;
import com.minierp.dao.QueryDao;
import com.minierp.dao.TallySetDao;
import com.minierp.err.PermissionDennyException;
import com.minierp.helper.EncCommonHelper;
import com.minierp.helper.PageHelper;
import com.minierp.model.OvBill;
import com.minierp.model.TallySet;
import com.minierp.service.OvBillService;
import com.minierp.view.OvBillListExcelView;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Vector;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
import org.springframework.dao.CannotAcquireLockException;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

public class OvBillMACtr extends MultiActionController {
	private String dialogSuccessView;
	private String listForExamineView;
	private String infoForExamineView;
	private String listForUnExamineView;
	private String infoForUnExamineView;
	private String searchResultView;
	private String downloadView;
	private String listForCancelView;
	private String infoForCancelView;
	private String printView;
	private OvBillDao ovBillDao;
	private DepartmentDao departmentDao;
	private TallySetDao tallySetDao;
	private QueryDao queryDao;
	private CodeRuleDao codeRuleDao;
	private IdGenerator idGenerator;
	private OvBillService ovBillService;
	private DataSource dataSource;

	public ModelAndView handleExamine(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.dialogSuccessView);
		UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
		String idStr = request.getParameter("id_str");
		String flag = request.getParameter("flag");
		boolean examined = false;
		if (flag != null && flag.equals("1")) {
			examined = true;
		}

		String[] arr = idStr.split(";");
		boolean num = false;
		String msg;
		byte arg16;
		if (!examined) {
			if (!EncCommonHelper.checkPrivilege(request, "OV_UN_EXAM")) {
				throw new Exception("Permission deny!");
			}

			try {
				for (int examinerId = 0; examinerId < arr.length; ++examinerId) {
					this.ovBillService.txUnExamine(
							Long.parseLong(arr[examinerId]), this.ovBillDao);
				}

				msg = "反审核成功";
			} catch (CannotAcquireLockException arg15) {
				msg = "事务冲突故障，请重新操作！";
			}

			arg16 = 1;
		} else {
			if (!EncCommonHelper.checkPrivilege(request, "OV_EXAM")) {
				throw new Exception("Permission deny!");
			}

			long arg17 = ub.getStaffer().getId();
			String examinerName = ub.getStaffer().getStafferName();

			try {
				for (int w = 0; w < arr.length; ++w) {
					this.ovBillService.txExamine(Long.parseLong(arr[w]),
							this.ovBillDao, arg17, examinerName);
				}

				msg = "审核成功";
			} catch (CannotAcquireLockException arg14) {
				msg = "事务冲突故障，请重新操作！";
			}

			arg16 = 1;
		}

		mv.addObject("returnValue", String.valueOf(arg16));
		EncCommonHelper.setAlertMessage(request, msg);
		return mv;
	}

	public ModelAndView handleListForExamine(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "OV_EXAM")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			ModelAndView mv = new ModelAndView(this.listForExamineView);
			String searchKey = request.getParameter("search_key");
			String tsId = request.getParameter("ts_id");
			UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
			if (tsId == null || tsId.equals("")) {
				tsId = String.valueOf(ub.getUser().getDfTsId());
			}

			Date allowStart = null;
			if (EncCommonHelper.checkPurePrivilege(request, "NO_EARL_DATA")) {
				allowStart = EncCommonHelper.getEarlDataDate(request);
			}

			List tsList = PageHelper.getTallySetList(this.tallySetDao, ub);
			int perPageNum = EncCommonHelper.getPageSize(request);
			int total = this.ovBillDao.getListCount(searchKey, false,
					Long.parseLong(tsId), ub, allowStart);
			int pageno = EncCommonHelper.getCurrentPageIndex(request, total,
					perPageNum);
			int startIndex = (pageno - 1) * perPageNum;
			List list = this.ovBillDao.getList(searchKey, false,
					Long.parseLong(tsId), ub, allowStart, startIndex,
					perPageNum);
			mv.addObject("qr", EncCommonHelper.parseQueryResult(list, total,
					perPageNum, pageno));
			mv.addObject("searchKey", searchKey);
			mv.addObject("depList", this.departmentDao.getList(true));
			mv.addObject("tsId", tsId);
			mv.addObject("tsList", tsList);
			return mv;
		}
	}

	public ModelAndView handleInfoForExamine(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.infoForExamineView);
		String id = request.getParameter("id");
		this.getOvBill(mv, Long.parseLong(id));
		return mv;
	}

	public ModelAndView handleListForUnExamine(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "OV_UN_EXAM")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			ModelAndView mv = new ModelAndView(this.listForUnExamineView);
			String searchKey = request.getParameter("search_key");
			String tsId = request.getParameter("ts_id");
			UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
			if (tsId == null || tsId.equals("")) {
				tsId = String.valueOf(ub.getUser().getDfTsId());
			}

			Date allowStart = null;
			if (EncCommonHelper.checkPurePrivilege(request, "NO_EARL_DATA")) {
				allowStart = EncCommonHelper.getEarlDataDate(request);
			}

			List tsList = PageHelper.getTallySetList(this.tallySetDao, ub);
			int perPageNum = EncCommonHelper.getPageSize(request);
			int total = this.ovBillDao.getListCount(searchKey, true,
					Long.parseLong(tsId), ub, allowStart);
			int pageno = EncCommonHelper.getCurrentPageIndex(request, total,
					perPageNum);
			int startIndex = (pageno - 1) * perPageNum;
			List list = this.ovBillDao.getList(searchKey, true,
					Long.parseLong(tsId), ub, allowStart, startIndex,
					perPageNum);
			mv.addObject("qr", EncCommonHelper.parseQueryResult(list, total,
					perPageNum, pageno));
			mv.addObject("searchKey", searchKey);
			mv.addObject("depList", this.departmentDao.getList(true));
			mv.addObject("tsId", tsId);
			mv.addObject("tsList", tsList);
			return mv;
		}
	}

	public ModelAndView handleInfoForUnExamine(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.infoForUnExamineView);
		String id = request.getParameter("id");
		this.getOvBill(mv, Long.parseLong(id));
		return mv;
	}

	public ModelAndView handleListForCancel(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "OV_CANC")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			ModelAndView mv = new ModelAndView(this.listForCancelView);
			String searchKey = request.getParameter("search_key");
			String tsId = request.getParameter("ts_id");
			UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
			if (tsId == null || tsId.equals("")) {
				tsId = String.valueOf(ub.getUser().getDfTsId());
			}

			Date allowStart = null;
			if (EncCommonHelper.checkPurePrivilege(request, "NO_EARL_DATA")) {
				allowStart = EncCommonHelper.getEarlDataDate(request);
			}

			List tsList = PageHelper.getTallySetList(this.tallySetDao, ub);
			int perPageNum = EncCommonHelper.getPageSize(request);
			int total = this.ovBillDao.getListCount(searchKey,
					Long.parseLong(tsId), ub, allowStart);
			int pageno = EncCommonHelper.getCurrentPageIndex(request, total,
					perPageNum);
			int startIndex = (pageno - 1) * perPageNum;
			List list = this.ovBillDao.getList(searchKey, Long.parseLong(tsId),
					ub, allowStart, startIndex, perPageNum);
			mv.addObject("qr", EncCommonHelper.parseQueryResult(list, total,
					perPageNum, pageno));
			mv.addObject("searchKey", searchKey);
			mv.addObject("depList", this.departmentDao.getList(true));
			mv.addObject("tsId", tsId);
			mv.addObject("tsList", tsList);
			return mv;
		}
	}

	public ModelAndView handleInfoForCancel(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.infoForCancelView);
		String id = request.getParameter("id");
		this.getOvBill(mv, Long.parseLong(id));
		return mv;
	}

	public ModelAndView handleCancel(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.dialogSuccessView);
		UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
		if (!EncCommonHelper.checkPrivilege(request, "OV_CANC")) {
			throw new Exception("Permission deny!");
		} else {
			String id = request.getParameter("id");
			String reason = request.getParameter("reason");

			String msg;
			try {
				this.ovBillService.txCancel(Long.parseLong(id), reason,
						this.ovBillDao, ub, this.idGenerator);
				msg = "作废成功！";
			} catch (CannotAcquireLockException arg8) {
				msg = "事务冲突故障，请重新操作！";
			}

			mv.addObject("returnValue", id);
			EncCommonHelper.setAlertMessage(request, msg);
			return mv;
		}
	}

	private void getOvBill(ModelAndView mv, long id) {
		OvBill ovBill = (OvBill) this.ovBillDao.get(OvBill.class, id);
		if (ovBill != null && ovBill.getTallySetId() != 0L) {
			mv.addObject("tallySet",
					this.ovBillDao.get(TallySet.class, ovBill.getTallySetId()));
		}

		mv.addObject("record", ovBill);
		mv.addObject("depList", this.departmentDao.getList(true));
	}

	public ModelAndView handleSearchResult(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "OV_BILL_SEAR")) {
			throw new PermissionDennyException("Permission Denny");
		} else {
			ModelAndView mv = new ModelAndView(this.searchResultView);
			String contentType = request.getParameter("content_type");
			if (contentType != null && contentType.equals("EXCEL")) {
				mv = new ModelAndView(this.downloadView);
			}

			List depList = this.departmentDao.getList(true);
			String billObjName = "com.minierp.model.OvBill";
			String billObjShortName = "b";
			HashMap shortNameMap = new HashMap();
			String[] retObjs = new String[]{billObjShortName};
			Vector qpVe = new Vector();
			HashMap parameters = new HashMap();
			shortNameMap.put(billObjName, billObjShortName);
			QueryParameterCarrier qp = new QueryParameterCarrier();
			qp.objectName = billObjName;
			qp.propertyName = "enabled";
			qp.value = " b.enabled=\'Y\'";
			qp.dataType = 6;
			qp.logicType = 10;
			qpVe.add(qp);
			UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
			String searchType = request.getParameter("search_type");
			String startDate = request.getParameter("start_date");
			String endDate = request.getParameter("end_date");
			String exa = request.getParameter("exa");
			String staName = request.getParameter("sta_name");
			String staId = request.getParameter("sta_id");
			String depId = request.getParameter("dep_id");
			String ot = request.getParameter("ot");
			String billCode = request.getParameter("bill_code");
			String mark = request.getParameter("mark");
			String minCost = request.getParameter("min_cost");
			String maxCost = request.getParameter("max_cost");
			String creaName = request.getParameter("crea_name");
			String tsId = request.getParameter("ts_id");
			Date now = new Date();
			SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
			SimpleDateFormat shortSf = new SimpleDateFormat("yyyy-MM");
			Date allowStart = null;
			if (EncCommonHelper.checkPurePrivilege(request, "NO_EARL_DATA")) {
				allowStart = EncCommonHelper.getEarlDataDate(request);
			}

			if (EncCommonHelper.checkPurePrivilege(request, "OUTP_SELF")) {
				qp = new QueryParameterCarrier();
				qp.objectName = billObjName;
				qp.propertyName = "stafferId";
				qp.value = String.valueOf(ub.getStaffer().getId());
				qp.dataType = 3;
				qp.logicType = 1;
				qpVe.add(qp);
			}

			if (searchType != null && !searchType.equals("")) {
				String p1;
				if (searchType.equals("2")) {
					if (allowStart != null
							&& allowStart.after(sf.parse(startDate))) {
						qp = new QueryParameterCarrier();
						qp.objectName = billObjName;
						qp.propertyName = "outDate";
						qp.value = sf.format(allowStart);
						qp.dataType = 4;
						qp.logicType = 5;
						qpVe.add(qp);
					} else {
						qp = new QueryParameterCarrier();
						qp.objectName = billObjName;
						qp.propertyName = "outDate";
						qp.value = startDate;
						qp.dataType = 4;
						qp.logicType = 5;
						qpVe.add(qp);
					}

					qp = new QueryParameterCarrier();
					qp.objectName = billObjName;
					qp.propertyName = "outDate";
					qp.value = EncCommonHelper.getNextDateStr(endDate,
							"yyyy-MM-dd");
					qp.dataType = 4;
					qp.logicType = 2;
					qpVe.add(qp);
					p1 = EncCommonHelper.createTallySetSQLStr("b.tallySetId",
							ub, false);
					if (p1 != null && !p1.equals("")) {
						qp = new QueryParameterCarrier();
						qp.objectName = billObjName;
						qp.propertyName = "tallySetId";
						qp.value = p1;
						qp.dataType = 6;
						qp.logicType = 10;
						qpVe.add(qp);
					}
				} else {
					p1 = request.getParameter("cb_date");
					String p2 = request.getParameter("cb_exa");
					String qParas = request.getParameter("cb_sta");
					String b = request.getParameter("cb_dep");
					String qr = request.getParameter("cb_ot");
					String countObjs = request.getParameter("cb_bill_code");
					String v = request.getParameter("cb_mark");
					String map = request.getParameter("cb_cost");
					String cbCrea = request.getParameter("cb_crea");
					String cbTs = request.getParameter("cb_ts");
					String depObjName;
					if (cbTs != null && cbTs.equals("1")) {
						qp = new QueryParameterCarrier();
						qp.objectName = billObjName;
						qp.propertyName = "tallySetId";
						qp.value = " b.tallySetId=" + tsId;
						qp.dataType = 6;
						qp.logicType = 10;
						qpVe.add(qp);
						parameters.put("cbTs", cbTs);
					} else {
						depObjName = EncCommonHelper.createTallySetSQLStr(
								"b.tallySetId", ub, false);
						if (depObjName != null && !depObjName.equals("")) {
							qp = new QueryParameterCarrier();
							qp.objectName = billObjName;
							qp.propertyName = "tallySetId";
							qp.value = depObjName;
							qp.dataType = 6;
							qp.logicType = 10;
							qpVe.add(qp);
						}
					}

					if (p1 != null && p1.equals("1")) {
						if (allowStart != null
								&& allowStart.after(sf.parse(startDate))) {
							qp = new QueryParameterCarrier();
							qp.objectName = billObjName;
							qp.propertyName = "outDate";
							qp.value = sf.format(allowStart);
							qp.dataType = 4;
							qp.logicType = 5;
							qpVe.add(qp);
						} else {
							qp = new QueryParameterCarrier();
							qp.objectName = billObjName;
							qp.propertyName = "outDate";
							qp.value = startDate;
							qp.dataType = 4;
							qp.logicType = 5;
							qpVe.add(qp);
						}

						qp = new QueryParameterCarrier();
						qp.objectName = billObjName;
						qp.propertyName = "outDate";
						qp.value = EncCommonHelper.getNextDateStr(endDate,
								"yyyy-MM-dd");
						qp.dataType = 4;
						qp.logicType = 2;
						qpVe.add(qp);
						parameters.put("cbDate", p1);
					} else if (allowStart != null) {
						qp = new QueryParameterCarrier();
						qp.objectName = billObjName;
						qp.propertyName = "outDate";
						qp.value = sf.format(allowStart);
						qp.dataType = 4;
						qp.logicType = 5;
						qpVe.add(qp);
					}

					if (p2 != null && p2.equals("1")) {
						if (!exa.equalsIgnoreCase("A")) {
							qp = new QueryParameterCarrier();
							qp.objectName = billObjName;
							qp.propertyName = "examined";
							qp.value = exa;
							qp.dataType = 1;
							qp.logicType = 1;
							qpVe.add(qp);
						}

						parameters.put("cbExa", p2);
					}

					if (qParas != null && qParas.equals("1")) {
						qp = new QueryParameterCarrier();
						qp.objectName = billObjName;
						qp.propertyName = "stafferId";
						qp.value = staId;
						qp.dataType = 3;
						qp.logicType = 1;
						qpVe.add(qp);
						parameters.put("cbSta", qParas);
					}

					if (b != null && b.equals("1")) {
						depObjName = "com.minierp.model.Department";
						String depObjShortName = "d";
						shortNameMap.put(depObjName, depObjShortName);
						qpVe.add(new QueryParameterCarrier(billObjName,
								"depId", " b.depId=d.id", 6, 10));
						qpVe.add(new QueryParameterCarrier(billObjName,
								"depId", " (d.id=" + depId
										+ " or (d.parentIdStr like \'%;"
										+ depId + ";%\'))", 6, 10));
						parameters.put("cbDep", b);
					}

					if (qr != null && qr.equals("1")) {
						qp = new QueryParameterCarrier();
						qp.objectName = billObjName;
						qp.propertyName = "outType";
						qp.value = ot;
						qp.dataType = 1;
						qp.logicType = 1;
						qpVe.add(qp);
						parameters.put("cbOt", qr);
					}

					if (countObjs != null && countObjs.equals("1")) {
						qp = new QueryParameterCarrier();
						qp.objectName = billObjName;
						qp.propertyName = "billCode";
						qp.value = billCode;
						qp.dataType = 1;
						qp.logicType = 9;
						qpVe.add(qp);
						parameters.put("cbBillCode", countObjs);
					}

					if (v != null && v.equals("1")) {
						qp = new QueryParameterCarrier();
						qp.objectName = billObjName;
						qp.propertyName = "description";
						qp.value = mark;
						qp.dataType = 1;
						qp.logicType = 9;
						qpVe.add(qp);
						parameters.put("cbMark", v);
					}

					if (map != null && map.equals("1")) {
						qp = new QueryParameterCarrier();
						qp.objectName = billObjName;
						qp.propertyName = "cost";
						qp.value = minCost;
						qp.dataType = 5;
						qp.logicType = 5;
						qpVe.add(qp);
						qp = new QueryParameterCarrier();
						qp.objectName = billObjName;
						qp.propertyName = "cost";
						qp.value = maxCost;
						qp.dataType = 5;
						qp.logicType = 2;
						qpVe.add(qp);
						parameters.put("cbCost", map);
					}

					if (cbCrea != null && cbCrea.equals("1")) {
						qp = new QueryParameterCarrier();
						qp.objectName = billObjName;
						qp.propertyName = "createrName";
						qp.value = creaName;
						qp.dataType = 1;
						qp.logicType = 9;
						qpVe.add(qp);
						parameters.put("cbCrea", cbCrea);
					}
				}
			} else {
				searchType = "1";
				startDate = shortSf.format(now) + "-01";
				endDate = sf.format(now);
				if (allowStart != null && allowStart.after(sf.parse(startDate))) {
					qp = new QueryParameterCarrier();
					qp.objectName = billObjName;
					qp.propertyName = "outDate";
					qp.value = sf.format(allowStart);
					qp.dataType = 4;
					qp.logicType = 5;
					qpVe.add(qp);
				} else {
					qp = new QueryParameterCarrier();
					qp.objectName = billObjName;
					qp.propertyName = "outDate";
					qp.value = startDate;
					qp.dataType = 4;
					qp.logicType = 5;
					qpVe.add(qp);
				}

				qp = new QueryParameterCarrier();
				qp.objectName = billObjName;
				qp.propertyName = "outDate";
				qp.value = EncCommonHelper
						.getNextDateStr(endDate, "yyyy-MM-dd");
				qp.dataType = 4;
				qp.logicType = 2;
				qpVe.add(qp);
				parameters.put("cbDate", "1");
				tsId = String.valueOf(ub.getUser().getDfTsId());
				qp = new QueryParameterCarrier();
				qp.objectName = billObjName;
				qp.propertyName = "tallySetId";
				qp.value = " b.tallySetId=" + tsId;
				qp.dataType = 6;
				qp.logicType = 10;
				qpVe.add(qp);
				parameters.put("cbTs", "1");
			}

			OrderParameterCarrier arg44 = new OrderParameterCarrier();
			arg44.objectName = billObjName;
			arg44.propertyName = "outDate";
			arg44.orderTarget = "desc";
			OrderParameterCarrier arg45 = new OrderParameterCarrier();
			arg45.objectName = billObjName;
			arg45.propertyName = "billCode";
			arg45.orderTarget = "desc";
			OrderParameterCarrier[] oParas = new OrderParameterCarrier[]{arg44,
					arg45};
			parameters.put("searchType", searchType);
			parameters.put("startDate", startDate);
			parameters.put("endDate", endDate);
			parameters.put("tsId", tsId);
			parameters.put("exa", exa);
			parameters.put("staName", staName);
			parameters.put("staId", staId);
			parameters.put("depId", depId);
			parameters.put("ot", ot);
			parameters.put("billCode", billCode);
			parameters.put("mark", mark);
			parameters.put("minCost", minCost);
			parameters.put("maxCost", maxCost);
			parameters.put("creaName", creaName);
			QueryParameterCarrier[] arg46 = new QueryParameterCarrier[qpVe
					.size()];

			for (int arg47 = 0; arg47 < qpVe.size(); ++arg47) {
				arg46[arg47] = (QueryParameterCarrier) qpVe.get(arg47);
			}

			QueryParameterBean arg48 = new QueryParameterBean();
			arg48.setCurrentPage(EncCommonHelper.getCurrentPageIndex(request));
			arg48.setOParas(oParas);
			arg48.setPageSize(EncCommonHelper.getPageSize(request));
			arg48.setParameters(parameters);
			arg48.setQParas(arg46);
			arg48.setRetObjs(retObjs);
			arg48.setShortNameMap(shortNameMap);
			String[] arg50 = new String[]{"sum(b.cost)"};
			QueryResult arg49;
			if (contentType != null && contentType.equals("EXCEL")) {
				arg49 = this.queryDao.doQuery(arg48.getQParas(),
						arg48.getOParas(), (String[]) null,
						arg48.getShortNameMap(), arg48.getRetObjs(), arg50);
				OvBillListExcelView arg51 = new OvBillListExcelView();
				HashMap arg52 = new HashMap();
				arg52.put("list", arg49.getList());
				arg52.put("costTotal", arg49.getExtCount()[0]);
				arg52.put("depList", depList);
				return new ModelAndView(arg51, arg52);
			} else {
				arg49 = this.queryDao.doQuery(arg48.getCurrentPage(),
						arg48.getPageSize(), arg48.getQParas(),
						arg48.getOParas(), (String[]) null,
						arg48.getShortNameMap(), arg48.getRetObjs(), arg50);
				mv.addAllObjects(arg48.getParameters());
				mv.addObject("qr", arg49);
				mv.addObject("costTotal", arg49.getExtCount()[0]);
				mv.addObject("depList", depList);
				mv.addObject("tsList",
						PageHelper.getTallySetList(this.tallySetDao, ub));
				return mv;
			}
		}
	}

	public ModelAndView handlePrint(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String id = request.getParameter("id");
		ModelAndView mv = new ModelAndView(this.printView);
		this.getOvBill(mv, Long.parseLong(id));
		mv.addObject("codeRule", this.codeRuleDao.get("OV_BILL"));
		return mv;
	}

	public String getPrintView() {
		return this.printView;
	}

	public void setPrintView(String printView) {
		this.printView = printView;
	}

	public String getDialogSuccessView() {
		return this.dialogSuccessView;
	}

	public void setDialogSuccessView(String dialogSuccessView) {
		this.dialogSuccessView = dialogSuccessView;
	}

	public OvBillDao getOvBillDao() {
		return this.ovBillDao;
	}

	public void setOvBillDao(OvBillDao ovBillDao) {
		this.ovBillDao = ovBillDao;
	}

	public String getInfoForExamineView() {
		return this.infoForExamineView;
	}

	public void setInfoForExamineView(String infoForExamineView) {
		this.infoForExamineView = infoForExamineView;
	}

	public String getInfoForUnExamineView() {
		return this.infoForUnExamineView;
	}

	public void setInfoForUnExamineView(String infoForUnExamineView) {
		this.infoForUnExamineView = infoForUnExamineView;
	}

	public String getListForExamineView() {
		return this.listForExamineView;
	}

	public void setListForExamineView(String listForExamineView) {
		this.listForExamineView = listForExamineView;
	}

	public String getListForUnExamineView() {
		return this.listForUnExamineView;
	}

	public void setListForUnExamineView(String listForUnExamineView) {
		this.listForUnExamineView = listForUnExamineView;
	}

	public String getSearchResultView() {
		return this.searchResultView;
	}

	public void setSearchResultView(String searchResultView) {
		this.searchResultView = searchResultView;
	}

	public DepartmentDao getDepartmentDao() {
		return this.departmentDao;
	}

	public void setDepartmentDao(DepartmentDao departmentDao) {
		this.departmentDao = departmentDao;
	}

	public QueryDao getQueryDao() {
		return this.queryDao;
	}

	public void setQueryDao(QueryDao queryDao) {
		this.queryDao = queryDao;
	}

	public String getDownloadView() {
		return this.downloadView;
	}

	public void setDownloadView(String downloadView) {
		this.downloadView = downloadView;
	}

	public String getInfoForCancelView() {
		return this.infoForCancelView;
	}

	public void setInfoForCancelView(String infoForCancelView) {
		this.infoForCancelView = infoForCancelView;
	}

	public String getListForCancelView() {
		return this.listForCancelView;
	}

	public void setListForCancelView(String listForCancelView) {
		this.listForCancelView = listForCancelView;
	}

	public OvBillService getOvBillService() {
		return this.ovBillService;
	}

	public void setOvBillService(OvBillService ovBillService) {
		this.ovBillService = ovBillService;
	}

	public DataSource getDataSource() {
		return this.dataSource;
	}

	public void setDataSource(DataSource dataSource) {
		this.dataSource = dataSource;
	}

	public IdGenerator getIdGenerator() {
		return this.idGenerator;
	}

	public void setIdGenerator(IdGenerator idGenerator) {
		this.idGenerator = idGenerator;
	}

	public TallySetDao getTallySetDao() {
		return this.tallySetDao;
	}

	public void setTallySetDao(TallySetDao tallySetDao) {
		this.tallySetDao = tallySetDao;
	}

	public CodeRuleDao getCodeRuleDao() {
		return this.codeRuleDao;
	}

	public void setCodeRuleDao(CodeRuleDao codeRuleDao) {
		this.codeRuleDao = codeRuleDao;
	}
}